Optimal. Leaf size=142 \[ -\frac {B (b c-a d)^3 n x}{4 d^3}+\frac {B (b c-a d)^2 n (a+b x)^2}{8 b d^2}-\frac {B (b c-a d) n (a+b x)^3}{12 b d}+\frac {B (b c-a d)^4 n \log (c+d x)}{4 b d^4}+\frac {(a+b x)^4 \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right )}{4 b} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 142, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.065, Rules used = {2548, 45}
\begin {gather*} \frac {(a+b x)^4 \left (B \log \left (e (a+b x)^n (c+d x)^{-n}\right )+A\right )}{4 b}+\frac {B n (b c-a d)^4 \log (c+d x)}{4 b d^4}-\frac {B n x (b c-a d)^3}{4 d^3}+\frac {B n (a+b x)^2 (b c-a d)^2}{8 b d^2}-\frac {B n (a+b x)^3 (b c-a d)}{12 b d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 45
Rule 2548
Rubi steps
\begin {align*} \int (a+b x)^3 \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right ) \, dx &=\int \left (A (a+b x)^3+B (a+b x)^3 \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right ) \, dx\\ &=\frac {A (a+b x)^4}{4 b}+B \int (a+b x)^3 \log \left (e (a+b x)^n (c+d x)^{-n}\right ) \, dx\\ &=\frac {A (a+b x)^4}{4 b}+\frac {B (a+b x)^4 \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{4 b}-\frac {(B (b c-a d) n) \int \frac {(a+b x)^3}{c+d x} \, dx}{4 b}\\ &=\frac {A (a+b x)^4}{4 b}+\frac {B (a+b x)^4 \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{4 b}-\frac {(B (b c-a d) n) \int \left (\frac {b (b c-a d)^2}{d^3}-\frac {b (b c-a d) (a+b x)}{d^2}+\frac {b (a+b x)^2}{d}+\frac {(-b c+a d)^3}{d^3 (c+d x)}\right ) \, dx}{4 b}\\ &=-\frac {B (b c-a d)^3 n x}{4 d^3}+\frac {B (b c-a d)^2 n (a+b x)^2}{8 b d^2}-\frac {B (b c-a d) n (a+b x)^3}{12 b d}+\frac {A (a+b x)^4}{4 b}+\frac {B (b c-a d)^4 n \log (c+d x)}{4 b d^4}+\frac {B (a+b x)^4 \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{4 b}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.16, size = 250, normalized size = 1.76 \begin {gather*} \frac {6 a^4 B d^4 n \log (a+b x)+6 b B c \left (b^3 c^3-4 a b^2 c^2 d+6 a^2 b c d^2-4 a^3 d^3\right ) n \log (c+d x)+b d x \left (6 a^3 d^3 (4 A+3 B n)+9 a^2 b d^2 (-4 B c n+4 A d x+B d n x)+b^3 \left (6 A d^3 x^3+B c n \left (-6 c^2+3 c d x-2 d^2 x^2\right )\right )+2 a b^2 d \left (12 A d^2 x^2+B n \left (12 c^2-6 c d x+d^2 x^2\right )\right )+6 B d^3 \left (4 a^3+6 a^2 b x+4 a b^2 x^2+b^3 x^3\right ) \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right )}{24 b d^4} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
3.
time = 0.38, size = 1838, normalized size = 12.94
method | result | size |
risch | \(\text {Expression too large to display}\) | \(1838\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 475 vs.
\(2 (133) = 266\).
time = 0.33, size = 475, normalized size = 3.35 \begin {gather*} \frac {1}{4} \, B b^{3} x^{4} \log \left (\frac {{\left (b x + a\right )}^{n} e}{{\left (d x + c\right )}^{n}}\right ) + \frac {1}{4} \, A b^{3} x^{4} + B a b^{2} x^{3} \log \left (\frac {{\left (b x + a\right )}^{n} e}{{\left (d x + c\right )}^{n}}\right ) + A a b^{2} x^{3} + \frac {3}{2} \, B a^{2} b x^{2} \log \left (\frac {{\left (b x + a\right )}^{n} e}{{\left (d x + c\right )}^{n}}\right ) + \frac {3}{2} \, A a^{2} b x^{2} + {\left (\frac {a n e \log \left (b x + a\right )}{b} - \frac {c n e \log \left (d x + c\right )}{d}\right )} B a^{3} e^{\left (-1\right )} - \frac {3}{2} \, {\left (\frac {a^{2} n e \log \left (b x + a\right )}{b^{2}} - \frac {c^{2} n e \log \left (d x + c\right )}{d^{2}} + \frac {{\left (b c n - a d n\right )} x e}{b d}\right )} B a^{2} b e^{\left (-1\right )} + \frac {1}{2} \, {\left (\frac {2 \, a^{3} n e \log \left (b x + a\right )}{b^{3}} - \frac {2 \, c^{3} n e \log \left (d x + c\right )}{d^{3}} - \frac {{\left (b^{2} c d n - a b d^{2} n\right )} x^{2} e - 2 \, {\left (b^{2} c^{2} n - a^{2} d^{2} n\right )} x e}{b^{2} d^{2}}\right )} B a b^{2} e^{\left (-1\right )} - \frac {1}{24} \, {\left (\frac {6 \, a^{4} n e \log \left (b x + a\right )}{b^{4}} - \frac {6 \, c^{4} n e \log \left (d x + c\right )}{d^{4}} + \frac {2 \, {\left (b^{3} c d^{2} n - a b^{2} d^{3} n\right )} x^{3} e - 3 \, {\left (b^{3} c^{2} d n - a^{2} b d^{3} n\right )} x^{2} e + 6 \, {\left (b^{3} c^{3} n - a^{3} d^{3} n\right )} x e}{b^{3} d^{3}}\right )} B b^{3} e^{\left (-1\right )} + B a^{3} x \log \left (\frac {{\left (b x + a\right )}^{n} e}{{\left (d x + c\right )}^{n}}\right ) + A a^{3} x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 370 vs.
\(2 (133) = 266\).
time = 0.35, size = 370, normalized size = 2.61 \begin {gather*} \frac {6 \, {\left (A + B\right )} b^{4} d^{4} x^{4} + 2 \, {\left (12 \, {\left (A + B\right )} a b^{3} d^{4} - {\left (B b^{4} c d^{3} - B a b^{3} d^{4}\right )} n\right )} x^{3} + 3 \, {\left (12 \, {\left (A + B\right )} a^{2} b^{2} d^{4} + {\left (B b^{4} c^{2} d^{2} - 4 \, B a b^{3} c d^{3} + 3 \, B a^{2} b^{2} d^{4}\right )} n\right )} x^{2} + 6 \, {\left (4 \, {\left (A + B\right )} a^{3} b d^{4} - {\left (B b^{4} c^{3} d - 4 \, B a b^{3} c^{2} d^{2} + 6 \, B a^{2} b^{2} c d^{3} - 3 \, B a^{3} b d^{4}\right )} n\right )} x + 6 \, {\left (B b^{4} d^{4} n x^{4} + 4 \, B a b^{3} d^{4} n x^{3} + 6 \, B a^{2} b^{2} d^{4} n x^{2} + 4 \, B a^{3} b d^{4} n x + B a^{4} d^{4} n\right )} \log \left (b x + a\right ) - 6 \, {\left (B b^{4} d^{4} n x^{4} + 4 \, B a b^{3} d^{4} n x^{3} + 6 \, B a^{2} b^{2} d^{4} n x^{2} + 4 \, B a^{3} b d^{4} n x - {\left (B b^{4} c^{4} - 4 \, B a b^{3} c^{3} d + 6 \, B a^{2} b^{2} c^{2} d^{2} - 4 \, B a^{3} b c d^{3}\right )} n\right )} \log \left (d x + c\right )}{24 \, b d^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: HeuristicGCDFailed} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 355 vs.
\(2 (133) = 266\).
time = 8.90, size = 355, normalized size = 2.50 \begin {gather*} \frac {B a^{4} n \log \left (b x + a\right )}{4 \, b} + \frac {1}{4} \, {\left (A b^{3} + B b^{3}\right )} x^{4} - \frac {{\left (B b^{3} c n - B a b^{2} d n - 12 \, A a b^{2} d - 12 \, B a b^{2} d\right )} x^{3}}{12 \, d} + \frac {1}{4} \, {\left (B b^{3} n x^{4} + 4 \, B a b^{2} n x^{3} + 6 \, B a^{2} b n x^{2} + 4 \, B a^{3} n x\right )} \log \left (b x + a\right ) - \frac {1}{4} \, {\left (B b^{3} n x^{4} + 4 \, B a b^{2} n x^{3} + 6 \, B a^{2} b n x^{2} + 4 \, B a^{3} n x\right )} \log \left (d x + c\right ) + \frac {{\left (B b^{3} c^{2} n - 4 \, B a b^{2} c d n + 3 \, B a^{2} b d^{2} n + 12 \, A a^{2} b d^{2} + 12 \, B a^{2} b d^{2}\right )} x^{2}}{8 \, d^{2}} - \frac {{\left (B b^{3} c^{3} n - 4 \, B a b^{2} c^{2} d n + 6 \, B a^{2} b c d^{2} n - 3 \, B a^{3} d^{3} n - 4 \, A a^{3} d^{3} - 4 \, B a^{3} d^{3}\right )} x}{4 \, d^{3}} + \frac {{\left (B b^{3} c^{4} n - 4 \, B a b^{2} c^{3} d n + 6 \, B a^{2} b c^{2} d^{2} n - 4 \, B a^{3} c d^{3} n\right )} \log \left (d x + c\right )}{4 \, d^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 4.49, size = 520, normalized size = 3.66 \begin {gather*} x^3\,\left (\frac {b^2\,\left (16\,A\,a\,d+4\,A\,b\,c+B\,a\,d\,n-B\,b\,c\,n\right )}{12\,d}-\frac {A\,b^2\,\left (4\,a\,d+4\,b\,c\right )}{12\,d}\right )+\ln \left (\frac {e\,{\left (a+b\,x\right )}^n}{{\left (c+d\,x\right )}^n}\right )\,\left (B\,a^3\,x+\frac {3\,B\,a^2\,b\,x^2}{2}+B\,a\,b^2\,x^3+\frac {B\,b^3\,x^4}{4}\right )+x\,\left (\frac {a^2\,\left (8\,A\,a\,d+12\,A\,b\,c+3\,B\,a\,d\,n-3\,B\,b\,c\,n\right )}{2\,d}+\frac {\left (4\,a\,d+4\,b\,c\right )\,\left (\frac {\left (4\,a\,d+4\,b\,c\right )\,\left (\frac {b^2\,\left (16\,A\,a\,d+4\,A\,b\,c+B\,a\,d\,n-B\,b\,c\,n\right )}{4\,d}-\frac {A\,b^2\,\left (4\,a\,d+4\,b\,c\right )}{4\,d}\right )}{4\,b\,d}-\frac {a\,b\,\left (6\,A\,a\,d+4\,A\,b\,c+B\,a\,d\,n-B\,b\,c\,n\right )}{d}+\frac {A\,a\,b^2\,c}{d}\right )}{4\,b\,d}-\frac {a\,c\,\left (\frac {b^2\,\left (16\,A\,a\,d+4\,A\,b\,c+B\,a\,d\,n-B\,b\,c\,n\right )}{4\,d}-\frac {A\,b^2\,\left (4\,a\,d+4\,b\,c\right )}{4\,d}\right )}{b\,d}\right )-x^2\,\left (\frac {\left (4\,a\,d+4\,b\,c\right )\,\left (\frac {b^2\,\left (16\,A\,a\,d+4\,A\,b\,c+B\,a\,d\,n-B\,b\,c\,n\right )}{4\,d}-\frac {A\,b^2\,\left (4\,a\,d+4\,b\,c\right )}{4\,d}\right )}{8\,b\,d}-\frac {a\,b\,\left (6\,A\,a\,d+4\,A\,b\,c+B\,a\,d\,n-B\,b\,c\,n\right )}{2\,d}+\frac {A\,a\,b^2\,c}{2\,d}\right )+\frac {A\,b^3\,x^4}{4}+\frac {\ln \left (c+d\,x\right )\,\left (-4\,B\,n\,a^3\,c\,d^3+6\,B\,n\,a^2\,b\,c^2\,d^2-4\,B\,n\,a\,b^2\,c^3\,d+B\,n\,b^3\,c^4\right )}{4\,d^4}+\frac {B\,a^4\,n\,\ln \left (a+b\,x\right )}{4\,b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________